package com.kmxd.ams.client.archive.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 门类|档案库配置主表
 *
 * @author ZuoLG
 * @since 2022-07-15
 */
@Data
@Schema(description = "门类|档案库配置主表对象")
public class ArchiveTypeVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  @Schema(description = "公司ID")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "公司ID")
  private Long comId;

  @Schema(description = "全宗ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long fondsId;

  @Schema(description = "名称 当前全宗下不可重复。由于此表是逻辑删除，因此需要排除掉已删除的记录的名字进行查重")
  private String name;

  @Schema(
      description =
          "元数据模板类型 document文书档案、account会计档案、technical科技档案、img照片档案、radio音频档案、video视频档案、entity实物档案、other其他档案、material资料 这里是定义“业务附加元数据”")
  private String model;

  @Schema(description = "管理模式 前端收集库、档案库模板调用")
  private String manageModel;

  @Schema(description = "文档的表名 同步自php")
  private String docTableId;

  @Schema(description = "盒表名 同步自php")
  private String boxTableId;

  @Schema(description = "案卷表名 同步自php")
  private String volTableId;

  @Schema(description = "项目的表名 同步自php")
  private String projTableId;

  @Schema(description = "档案索引编号如f1_35_box中的35 同步自php")
  @JsonSerialize(using = ToStringSerializer.class)
  private Integer archIndex;

  @Schema(description = "档案类型作为分类统计、数据展示控制的主要依据 数据来自sys_dis_detail")
  private String category;

  @Schema(description = "年报统计配置 同步自php，暂不清楚用在哪里")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long yearstatis;

  @Schema(description = "归档前是否进行四性检测")
  @JsonSerialize(using = ToStringSerializer.class)
  private Integer attributeTest;

  @Schema(description = "实体-启用电子档号章 0停用，1启用")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long enumEnabled;

  @Schema(description = "实体-默认规格 存具体数值：10、20、30、40、50、60")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long volBoxDefaultSize;

  @Schema(description = "保管期限代码表，数据来自sys_dict_item.code")
  private String rpCodeId;

  @Schema(description = "密级代码表，数据来自sys_dict_item.code")
  private String secretCodeId;

  @Schema(description = "水印配置id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long watermarkId;

  @Schema(description = "扩展信息")
  private String allowExtension;

  /** 包含案卷，0不包含，1包含 */
  private Boolean haveVol;

  /** 包含盒，0不包含，1包含 */
  private Boolean haveBox;

  /** 包含项目，0不包含，1包含 */
  private Boolean haveProject;

  @Schema(description = "排序")
  private Integer sort;

  @Schema(description = "创建人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long createBy;

  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @Schema(description = "更新人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long updateBy;

  @Schema(description = "更新时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;
}
